Optimal. Leaf size=507 \[ -\frac{b^{5/2} \tan ^{-1}\left (\frac{\sqrt{b} \sqrt{g \cos (e+f x)}}{\sqrt{g} \sqrt [4]{b^2-a^2}}\right )}{a f g^{3/2} \left (b^2-a^2\right )^{5/4}}+\frac{b^{5/2} \tanh ^{-1}\left (\frac{\sqrt{b} \sqrt{g \cos (e+f x)}}{\sqrt{g} \sqrt [4]{b^2-a^2}}\right )}{a f g^{3/2} \left (b^2-a^2\right )^{5/4}}+\frac{2 b E\left (\left .\frac{1}{2} (e+f x)\right |2\right ) \sqrt{g \cos (e+f x)}}{f g^2 \left (a^2-b^2\right ) \sqrt{\cos (e+f x)}}+\frac{2 b (b-a \sin (e+f x))}{a f g \left (a^2-b^2\right ) \sqrt{g \cos (e+f x)}}+\frac{b^2 \sqrt{\cos (e+f x)} \Pi \left (\frac{2 b}{b-\sqrt{b^2-a^2}};\left .\frac{1}{2} (e+f x)\right |2\right )}{f g \left (a^2-b^2\right ) \left (b-\sqrt{b^2-a^2}\right ) \sqrt{g \cos (e+f x)}}+\frac{b^2 \sqrt{\cos (e+f x)} \Pi \left (\frac{2 b}{b+\sqrt{b^2-a^2}};\left .\frac{1}{2} (e+f x)\right |2\right )}{f g \left (a^2-b^2\right ) \left (\sqrt{b^2-a^2}+b\right ) \sqrt{g \cos (e+f x)}}+\frac{\tan ^{-1}\left (\frac{\sqrt{g \cos (e+f x)}}{\sqrt{g}}\right )}{a f g^{3/2}}-\frac{\tanh ^{-1}\left (\frac{\sqrt{g \cos (e+f x)}}{\sqrt{g}}\right )}{a f g^{3/2}}+\frac{2}{a f g \sqrt{g \cos (e+f x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 1.3614, antiderivative size = 507, normalized size of antiderivative = 1., number of steps used = 21, number of rules used = 16, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.516, Rules used = {2898, 2565, 325, 329, 298, 203, 206, 2696, 2867, 2640, 2639, 2701, 2807, 2805, 205, 208} \[ -\frac{b^{5/2} \tan ^{-1}\left (\frac{\sqrt{b} \sqrt{g \cos (e+f x)}}{\sqrt{g} \sqrt [4]{b^2-a^2}}\right )}{a f g^{3/2} \left (b^2-a^2\right )^{5/4}}+\frac{b^{5/2} \tanh ^{-1}\left (\frac{\sqrt{b} \sqrt{g \cos (e+f x)}}{\sqrt{g} \sqrt [4]{b^2-a^2}}\right )}{a f g^{3/2} \left (b^2-a^2\right )^{5/4}}+\frac{2 b E\left (\left .\frac{1}{2} (e+f x)\right |2\right ) \sqrt{g \cos (e+f x)}}{f g^2 \left (a^2-b^2\right ) \sqrt{\cos (e+f x)}}+\frac{2 b (b-a \sin (e+f x))}{a f g \left (a^2-b^2\right ) \sqrt{g \cos (e+f x)}}+\frac{b^2 \sqrt{\cos (e+f x)} \Pi \left (\frac{2 b}{b-\sqrt{b^2-a^2}};\left .\frac{1}{2} (e+f x)\right |2\right )}{f g \left (a^2-b^2\right ) \left (b-\sqrt{b^2-a^2}\right ) \sqrt{g \cos (e+f x)}}+\frac{b^2 \sqrt{\cos (e+f x)} \Pi \left (\frac{2 b}{b+\sqrt{b^2-a^2}};\left .\frac{1}{2} (e+f x)\right |2\right )}{f g \left (a^2-b^2\right ) \left (\sqrt{b^2-a^2}+b\right ) \sqrt{g \cos (e+f x)}}+\frac{\tan ^{-1}\left (\frac{\sqrt{g \cos (e+f x)}}{\sqrt{g}}\right )}{a f g^{3/2}}-\frac{\tanh ^{-1}\left (\frac{\sqrt{g \cos (e+f x)}}{\sqrt{g}}\right )}{a f g^{3/2}}+\frac{2}{a f g \sqrt{g \cos (e+f x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2898
Rule 2565
Rule 325
Rule 329
Rule 298
Rule 203
Rule 206
Rule 2696
Rule 2867
Rule 2640
Rule 2639
Rule 2701
Rule 2807
Rule 2805
Rule 205
Rule 208
Rubi steps
\begin{align*} \int \frac{\csc (e+f x)}{(g \cos (e+f x))^{3/2} (a+b \sin (e+f x))} \, dx &=\int \left (\frac{\csc (e+f x)}{a (g \cos (e+f x))^{3/2}}-\frac{b}{a (g \cos (e+f x))^{3/2} (a+b \sin (e+f x))}\right ) \, dx\\ &=\frac{\int \frac{\csc (e+f x)}{(g \cos (e+f x))^{3/2}} \, dx}{a}-\frac{b \int \frac{1}{(g \cos (e+f x))^{3/2} (a+b \sin (e+f x))} \, dx}{a}\\ &=\frac{2 b (b-a \sin (e+f x))}{a \left (a^2-b^2\right ) f g \sqrt{g \cos (e+f x)}}+\frac{(2 b) \int \frac{\sqrt{g \cos (e+f x)} \left (\frac{a^2}{2}+\frac{b^2}{2}+\frac{1}{2} a b \sin (e+f x)\right )}{a+b \sin (e+f x)} \, dx}{a \left (a^2-b^2\right ) g^2}-\frac{\operatorname{Subst}\left (\int \frac{1}{x^{3/2} \left (1-\frac{x^2}{g^2}\right )} \, dx,x,g \cos (e+f x)\right )}{a f g}\\ &=\frac{2}{a f g \sqrt{g \cos (e+f x)}}+\frac{2 b (b-a \sin (e+f x))}{a \left (a^2-b^2\right ) f g \sqrt{g \cos (e+f x)}}-\frac{\operatorname{Subst}\left (\int \frac{\sqrt{x}}{1-\frac{x^2}{g^2}} \, dx,x,g \cos (e+f x)\right )}{a f g^3}+\frac{b \int \sqrt{g \cos (e+f x)} \, dx}{\left (a^2-b^2\right ) g^2}+\frac{b^3 \int \frac{\sqrt{g \cos (e+f x)}}{a+b \sin (e+f x)} \, dx}{a \left (a^2-b^2\right ) g^2}\\ &=\frac{2}{a f g \sqrt{g \cos (e+f x)}}+\frac{2 b (b-a \sin (e+f x))}{a \left (a^2-b^2\right ) f g \sqrt{g \cos (e+f x)}}-\frac{2 \operatorname{Subst}\left (\int \frac{x^2}{1-\frac{x^4}{g^2}} \, dx,x,\sqrt{g \cos (e+f x)}\right )}{a f g^3}-\frac{b^2 \int \frac{1}{\sqrt{g \cos (e+f x)} \left (\sqrt{-a^2+b^2}-b \cos (e+f x)\right )} \, dx}{2 \left (a^2-b^2\right ) g}+\frac{b^2 \int \frac{1}{\sqrt{g \cos (e+f x)} \left (\sqrt{-a^2+b^2}+b \cos (e+f x)\right )} \, dx}{2 \left (a^2-b^2\right ) g}+\frac{b^4 \operatorname{Subst}\left (\int \frac{\sqrt{x}}{\left (a^2-b^2\right ) g^2+b^2 x^2} \, dx,x,g \cos (e+f x)\right )}{a \left (a^2-b^2\right ) f g}+\frac{\left (b \sqrt{g \cos (e+f x)}\right ) \int \sqrt{\cos (e+f x)} \, dx}{\left (a^2-b^2\right ) g^2 \sqrt{\cos (e+f x)}}\\ &=\frac{2}{a f g \sqrt{g \cos (e+f x)}}+\frac{2 b \sqrt{g \cos (e+f x)} E\left (\left .\frac{1}{2} (e+f x)\right |2\right )}{\left (a^2-b^2\right ) f g^2 \sqrt{\cos (e+f x)}}+\frac{2 b (b-a \sin (e+f x))}{a \left (a^2-b^2\right ) f g \sqrt{g \cos (e+f x)}}-\frac{\operatorname{Subst}\left (\int \frac{1}{g-x^2} \, dx,x,\sqrt{g \cos (e+f x)}\right )}{a f g}+\frac{\operatorname{Subst}\left (\int \frac{1}{g+x^2} \, dx,x,\sqrt{g \cos (e+f x)}\right )}{a f g}+\frac{\left (2 b^4\right ) \operatorname{Subst}\left (\int \frac{x^2}{\left (a^2-b^2\right ) g^2+b^2 x^4} \, dx,x,\sqrt{g \cos (e+f x)}\right )}{a \left (a^2-b^2\right ) f g}-\frac{\left (b^2 \sqrt{\cos (e+f x)}\right ) \int \frac{1}{\sqrt{\cos (e+f x)} \left (\sqrt{-a^2+b^2}-b \cos (e+f x)\right )} \, dx}{2 \left (a^2-b^2\right ) g \sqrt{g \cos (e+f x)}}+\frac{\left (b^2 \sqrt{\cos (e+f x)}\right ) \int \frac{1}{\sqrt{\cos (e+f x)} \left (\sqrt{-a^2+b^2}+b \cos (e+f x)\right )} \, dx}{2 \left (a^2-b^2\right ) g \sqrt{g \cos (e+f x)}}\\ &=\frac{\tan ^{-1}\left (\frac{\sqrt{g \cos (e+f x)}}{\sqrt{g}}\right )}{a f g^{3/2}}-\frac{\tanh ^{-1}\left (\frac{\sqrt{g \cos (e+f x)}}{\sqrt{g}}\right )}{a f g^{3/2}}+\frac{2}{a f g \sqrt{g \cos (e+f x)}}+\frac{2 b \sqrt{g \cos (e+f x)} E\left (\left .\frac{1}{2} (e+f x)\right |2\right )}{\left (a^2-b^2\right ) f g^2 \sqrt{\cos (e+f x)}}+\frac{b^2 \sqrt{\cos (e+f x)} \Pi \left (\frac{2 b}{b-\sqrt{-a^2+b^2}};\left .\frac{1}{2} (e+f x)\right |2\right )}{\left (a^2-b^2\right ) \left (b-\sqrt{-a^2+b^2}\right ) f g \sqrt{g \cos (e+f x)}}+\frac{b^2 \sqrt{\cos (e+f x)} \Pi \left (\frac{2 b}{b+\sqrt{-a^2+b^2}};\left .\frac{1}{2} (e+f x)\right |2\right )}{\left (a^2-b^2\right ) \left (b+\sqrt{-a^2+b^2}\right ) f g \sqrt{g \cos (e+f x)}}+\frac{2 b (b-a \sin (e+f x))}{a \left (a^2-b^2\right ) f g \sqrt{g \cos (e+f x)}}-\frac{b^3 \operatorname{Subst}\left (\int \frac{1}{\sqrt{-a^2+b^2} g-b x^2} \, dx,x,\sqrt{g \cos (e+f x)}\right )}{a \left (a^2-b^2\right ) f g}+\frac{b^3 \operatorname{Subst}\left (\int \frac{1}{\sqrt{-a^2+b^2} g+b x^2} \, dx,x,\sqrt{g \cos (e+f x)}\right )}{a \left (a^2-b^2\right ) f g}\\ &=\frac{\tan ^{-1}\left (\frac{\sqrt{g \cos (e+f x)}}{\sqrt{g}}\right )}{a f g^{3/2}}-\frac{b^{5/2} \tan ^{-1}\left (\frac{\sqrt{b} \sqrt{g \cos (e+f x)}}{\sqrt [4]{-a^2+b^2} \sqrt{g}}\right )}{a \left (-a^2+b^2\right )^{5/4} f g^{3/2}}-\frac{\tanh ^{-1}\left (\frac{\sqrt{g \cos (e+f x)}}{\sqrt{g}}\right )}{a f g^{3/2}}+\frac{b^{5/2} \tanh ^{-1}\left (\frac{\sqrt{b} \sqrt{g \cos (e+f x)}}{\sqrt [4]{-a^2+b^2} \sqrt{g}}\right )}{a \left (-a^2+b^2\right )^{5/4} f g^{3/2}}+\frac{2}{a f g \sqrt{g \cos (e+f x)}}+\frac{2 b \sqrt{g \cos (e+f x)} E\left (\left .\frac{1}{2} (e+f x)\right |2\right )}{\left (a^2-b^2\right ) f g^2 \sqrt{\cos (e+f x)}}+\frac{b^2 \sqrt{\cos (e+f x)} \Pi \left (\frac{2 b}{b-\sqrt{-a^2+b^2}};\left .\frac{1}{2} (e+f x)\right |2\right )}{\left (a^2-b^2\right ) \left (b-\sqrt{-a^2+b^2}\right ) f g \sqrt{g \cos (e+f x)}}+\frac{b^2 \sqrt{\cos (e+f x)} \Pi \left (\frac{2 b}{b+\sqrt{-a^2+b^2}};\left .\frac{1}{2} (e+f x)\right |2\right )}{\left (a^2-b^2\right ) \left (b+\sqrt{-a^2+b^2}\right ) f g \sqrt{g \cos (e+f x)}}+\frac{2 b (b-a \sin (e+f x))}{a \left (a^2-b^2\right ) f g \sqrt{g \cos (e+f x)}}\\ \end{align*}
Mathematica [C] time = 27.5923, size = 1587, normalized size = 3.13 \[ \text{result too large to display} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 3.954, size = 425, normalized size = 0.8 \begin{align*}{\frac{1}{2\,af} \left ( - \left ( 4\,\ln \left ( 2\,{\frac{\sqrt{-g}\sqrt{-2\, \left ( \sin \left ( 1/2\,fx+e/2 \right ) \right ) ^{2}g+g}-g}{\cos \left ( 1/2\,fx+e/2 \right ) }} \right ){g}^{5/2}+2\,\ln \left ( 2\,{\frac{\sqrt{g}\sqrt{-2\, \left ( \sin \left ( 1/2\,fx+e/2 \right ) \right ) ^{2}g+g}+2\,g\cos \left ( 1/2\,fx+e/2 \right ) -g}{-1+\cos \left ( 1/2\,fx+e/2 \right ) }} \right ) \sqrt{-g}{g}^{2}+2\,\ln \left ( 2\,{\frac{\sqrt{g}\sqrt{-2\, \left ( \sin \left ( 1/2\,fx+e/2 \right ) \right ) ^{2}g+g}-2\,g\cos \left ( 1/2\,fx+e/2 \right ) -g}{\cos \left ( 1/2\,fx+e/2 \right ) +1}} \right ) \sqrt{-g}{g}^{2} \right ) \left ( \sin \left ({\frac{fx}{2}}+{\frac{e}{2}} \right ) \right ) ^{2}+2\,\ln \left ( 2\,{\frac{\sqrt{-g}\sqrt{-2\, \left ( \sin \left ( 1/2\,fx+e/2 \right ) \right ) ^{2}g+g}-g}{\cos \left ( 1/2\,fx+e/2 \right ) }} \right ){g}^{5/2}-4\,\sqrt{-2\, \left ( \sin \left ( 1/2\,fx+e/2 \right ) \right ) ^{2}g+g}{g}^{3/2}\sqrt{-g}+\ln \left ( 2\,{\frac{\sqrt{g}\sqrt{-2\, \left ( \sin \left ( 1/2\,fx+e/2 \right ) \right ) ^{2}g+g}+2\,g\cos \left ( 1/2\,fx+e/2 \right ) -g}{-1+\cos \left ( 1/2\,fx+e/2 \right ) }} \right ) \sqrt{-g}{g}^{2}+\ln \left ( 2\,{\frac{\sqrt{g}\sqrt{-2\, \left ( \sin \left ( 1/2\,fx+e/2 \right ) \right ) ^{2}g+g}-2\,g\cos \left ( 1/2\,fx+e/2 \right ) -g}{\cos \left ( 1/2\,fx+e/2 \right ) +1}} \right ) \sqrt{-g}{g}^{2} \right ){g}^{-{\frac{7}{2}}}{\frac{1}{\sqrt{-g}}} \left ( 2\, \left ( \sin \left ( 1/2\,fx+e/2 \right ) \right ) ^{2}-1 \right ) ^{-1}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\csc \left (f x + e\right )}{\left (g \cos \left (f x + e\right )\right )^{\frac{3}{2}}{\left (b \sin \left (f x + e\right ) + a\right )}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\csc \left (f x + e\right )}{\left (g \cos \left (f x + e\right )\right )^{\frac{3}{2}}{\left (b \sin \left (f x + e\right ) + a\right )}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]